package indi.jp.project.process.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 流程节点
 *
 * @author jiangping
 * @date 2022/5/3
 */
public class FlowTypeNode {

    /**
     * 主键
     */
    private String id;

    /**
     * 类型ID
     */
    @NotNull(message = "请选择流程类型")
    private Integer typeId;

    /**
     * 类型编码
     */
    @NotBlank(message = "请选择流程类型")
    private String typeCode;

    /**
     * 类型名称
     */
    @NotBlank(message = "请选择流程类型")
    private String typeName;

    /**
     * 节点名称
     */
    @NotBlank(message = "请输入节点名称")
    private String name;

    /**
     * 节点类型（0:固定人员，1:固定角色，2:人员&部门，3:角色&当前部门）
     */
    @NotNull(message = "请选择节点类型")
    private int category;

    /**
     * 节点状态，0：开始，99：结束
     */
    @NotNull(message = "请输入节点状态")
    @Range(min = 1, max = 98, message = "状态范围在1～98之间")
    private int state;

    /**
     * 节点名称
     */
    @NotBlank(message = "请输入节点名称")
    private String stateName;

    /**
     * 部门ID
     */
    private String departmentId;

    /**
     * 部门编码
     */
    private String departmentCode;

    /**
     * 部门名称
     */
    private String departmentName;

    /**
     * 角色编码
     */
    private String roleCode;

    /**
     * 角色名称
     */
    private String roleName;

    /**
     * 处理人
     */
    private String handler;

    /**
     * 处理人名称
     */
    private String handlerName;

    /**
     * 是否必须（0：否，1：是）
     */
    private boolean isRequired;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public String getTypeCode() {
        return typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCategory() {
        return category;
    }

    public void setCategory(int category) {
        this.category = category;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateName() {
        return stateName;
    }

    public void setStateName(String stateName) {
        this.stateName = stateName;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentCode() {
        return departmentCode;
    }

    public void setDepartmentCode(String departmentCode) {
        this.departmentCode = departmentCode;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getHandler() {
        return handler;
    }

    public void setHandler(String handler) {
        this.handler = handler;
    }

    public String getHandlerName() {
        return handlerName;
    }

    public void setHandlerName(String handlerName) {
        this.handlerName = handlerName;
    }

    public boolean isRequired() {
        return isRequired;
    }

    public void setRequired(boolean required) {
        isRequired = required;
    }
}
